package com.mode.mvc;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;

import com.mode.R;
import com.mode.mvc.model.OnWeatherListener;
import com.mode.mvc.model.WeatherModel;
import com.mode.mvc.model.WeatherVolleyModel;

public class MVCActivity extends AppCompatActivity implements OnWeatherListener {

    private static final String TAG = "MVCActivity";

    WeatherModel weatherModel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mvc);
        weatherModel = new WeatherVolleyModel();
        weatherModel.getWeather("", this);
    }

    @Override
    public void onSuccess() {
        updateWeaterUI();
    }

    @Override
    public void onError() {

    }

    private void updateWeaterUI() {
        Log.d(TAG, "Controller 更新 View");
    }

}